<?php
class Links extends CActiveRecord {	
	
	public static function model($className = __CLASS__) {
		return parent::model($className);
	}

	public function tableName() {
		return strtolower('Links');
	}
	
	public function rules() {
		return array(
			array('linkTo, desName', 'required'),
			array('sortOrder', 'numerical')
		);
	}
	
	public function defaultScope() {
		return array(
			'order' => 'sortOrder'
		);
	}
	
	public function attributeLabels() {
		return array(
			'desName' => '站点名称',
			'sortOrder' => '排序',
			'imageUrl' => '图片标识地址',
			'linkTo' => '链接地址'
		);
	}
}
